Optimal. Leaf size=130 \[ \frac {1}{4} (5+2 x) \sqrt {x+x^2}+\sqrt {1+\sqrt {2}} \tan ^{-1}\left (\frac {1+\sqrt {2}-x}{\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+x^2}}\right )-\sqrt {-1+\sqrt {2}} \tanh ^{-1}\left (\frac {1-\sqrt {2}-x}{\sqrt {2 \left (-1+\sqrt {2}\right )} \sqrt {x+x^2}}\right )-\frac {5}{4} \tanh ^{-1}\left (\frac {x}{\sqrt {x+x^2}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 9, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.529, Rules used = {992, 1092,
634, 212, 12, 1050, 1044, 213, 209} \begin {gather*} \sqrt {1+\sqrt {2}} \text {ArcTan}\left (\frac {-x+\sqrt {2}+1}{\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x^2+x}}\right )+\frac {1}{4} \sqrt {x^2+x} (2 x+5)-\sqrt {\sqrt {2}-1} \tanh ^{-1}\left (\frac {-x-\sqrt {2}+1}{\sqrt {2 \left (\sqrt {2}-1\right )} \sqrt {x^2+x}}\right )-\frac {5}{4} \tanh ^{-1}\left (\frac {x}{\sqrt {x^2+x}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 209
Rule 212
Rule 213
Rule 634
Rule 992
Rule 1044
Rule 1050
Rule 1092
Rubi steps
\begin {align*} \int \frac {\left (x+x^2\right )^{3/2}}{1+x^2} \, dx &=\frac {1}{4} (5+2 x) \sqrt {x+x^2}-\frac {1}{2} \int \frac {\frac {5}{4}+4 x+\frac {5 x^2}{4}}{\left (1+x^2\right ) \sqrt {x+x^2}} \, dx\\ &=\frac {1}{4} (5+2 x) \sqrt {x+x^2}-\frac {1}{2} \int \frac {4 x}{\left (1+x^2\right ) \sqrt {x+x^2}} \, dx-\frac {5}{8} \int \frac {1}{\sqrt {x+x^2}} \, dx\\ &=\frac {1}{4} (5+2 x) \sqrt {x+x^2}-\frac {5}{4} \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x}{\sqrt {x+x^2}}\right )-2 \int \frac {x}{\left (1+x^2\right ) \sqrt {x+x^2}} \, dx\\ &=\frac {1}{4} (5+2 x) \sqrt {x+x^2}-\frac {5}{4} \tanh ^{-1}\left (\frac {x}{\sqrt {x+x^2}}\right )+\frac {\int \frac {-1+\left (-1-\sqrt {2}\right ) x}{\left (1+x^2\right ) \sqrt {x+x^2}} \, dx}{\sqrt {2}}-\frac {\int \frac {-1+\left (-1+\sqrt {2}\right ) x}{\left (1+x^2\right ) \sqrt {x+x^2}} \, dx}{\sqrt {2}}\\ &=\frac {1}{4} (5+2 x) \sqrt {x+x^2}-\frac {5}{4} \tanh ^{-1}\left (\frac {x}{\sqrt {x+x^2}}\right )+\left (-2+\sqrt {2}\right ) \text {Subst}\left (\int \frac {1}{2 \left (1-\sqrt {2}\right )+x^2} \, dx,x,\frac {-1+\sqrt {2}+x}{\sqrt {x+x^2}}\right )-\left (2+\sqrt {2}\right ) \text {Subst}\left (\int \frac {1}{2 \left (1+\sqrt {2}\right )+x^2} \, dx,x,\frac {-1-\sqrt {2}+x}{\sqrt {x+x^2}}\right )\\ &=\frac {1}{4} (5+2 x) \sqrt {x+x^2}+\sqrt {1+\sqrt {2}} \tan ^{-1}\left (\frac {1+\sqrt {2}-x}{\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+x^2}}\right )-\sqrt {-1+\sqrt {2}} \tanh ^{-1}\left (\frac {1-\sqrt {2}-x}{\sqrt {2 \left (-1+\sqrt {2}\right )} \sqrt {x+x^2}}\right )-\frac {5}{4} \tanh ^{-1}\left (\frac {x}{\sqrt {x+x^2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 0.12, size = 117, normalized size = 0.90 \begin {gather*} \frac {\sqrt {x} \sqrt {1+x} \left (\sqrt {x} \sqrt {1+x} (5+2 x)-5 \tanh ^{-1}\left (\sqrt {\frac {x}{1+x}}\right )+8 \text {RootSum}\left [16+32 \text {$\#$1}+16 \text {$\#$1}^2+\text {$\#$1}^4\&,\frac {\log \left (-2 x+2 \sqrt {x} \sqrt {1+x}+\text {$\#$1}\right ) \text {$\#$1}^2}{8+8 \text {$\#$1}+\text {$\#$1}^3}\&\right ]\right )}{4 \sqrt {x (1+x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(788\) vs.
\(2(98)=196\).
time = 0.51, size = 789, normalized size = 6.07 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 777 vs.
\(2 (96) = 192\).
time = 0.37, size = 777, normalized size = 5.98 \begin {gather*} -\frac {1}{8} \cdot 8^{\frac {1}{4}} \sqrt {2 \, \sqrt {2} + 4} {\left (\sqrt {2} - 2\right )} \log \left (8 \, x^{2} - 8 \, \sqrt {x^{2} + x} x + 2 \, {\left (8^{\frac {1}{4}} \sqrt {x^{2} + x} {\left (\sqrt {2} - 1\right )} - 8^{\frac {1}{4}} {\left (\sqrt {2} x - x - 1\right )}\right )} \sqrt {2 \, \sqrt {2} + 4} + 4 \, x + 4 \, \sqrt {2} + 4\right ) + \frac {1}{8} \cdot 8^{\frac {1}{4}} \sqrt {2 \, \sqrt {2} + 4} {\left (\sqrt {2} - 2\right )} \log \left (8 \, x^{2} - 8 \, \sqrt {x^{2} + x} x - 2 \, {\left (8^{\frac {1}{4}} \sqrt {x^{2} + x} {\left (\sqrt {2} - 1\right )} - 8^{\frac {1}{4}} {\left (\sqrt {2} x - x - 1\right )}\right )} \sqrt {2 \, \sqrt {2} + 4} + 4 \, x + 4 \, \sqrt {2} + 4\right ) + \frac {1}{2} \cdot 8^{\frac {1}{4}} \sqrt {2} \sqrt {2 \, \sqrt {2} + 4} \arctan \left (\frac {1}{7} \, \sqrt {2} {\left (\sqrt {2} {\left (5 \, x + 1\right )} + 6 \, x + 4\right )} + \frac {1}{112} \, \sqrt {8 \, x^{2} - 8 \, \sqrt {x^{2} + x} x - 2 \, {\left (8^{\frac {1}{4}} \sqrt {x^{2} + x} {\left (\sqrt {2} - 1\right )} - 8^{\frac {1}{4}} {\left (\sqrt {2} x - x - 1\right )}\right )} \sqrt {2 \, \sqrt {2} + 4} + 4 \, x + 4 \, \sqrt {2} + 4} {\left (8 \, \sqrt {2} {\left (5 \, \sqrt {2} + 6\right )} + {\left (8^{\frac {3}{4}} {\left (5 \, \sqrt {2} + 6\right )} + 8 \cdot 8^{\frac {1}{4}} {\left (2 \, \sqrt {2} + 1\right )}\right )} \sqrt {2 \, \sqrt {2} + 4} + 64 \, \sqrt {2} + 32\right )} - \frac {1}{7} \, \sqrt {x^{2} + x} {\left (\sqrt {2} {\left (5 \, \sqrt {2} + 6\right )} + 8 \, \sqrt {2} + 4\right )} + \frac {1}{7} \, \sqrt {2} {\left (8 \, x + 3\right )} + \frac {1}{56} \, {\left (8^{\frac {3}{4}} {\left (\sqrt {2} {\left (5 \, x + 1\right )} + 6 \, x + 4\right )} - \sqrt {x^{2} + x} {\left (8^{\frac {3}{4}} {\left (5 \, \sqrt {2} + 6\right )} + 8 \cdot 8^{\frac {1}{4}} {\left (2 \, \sqrt {2} + 1\right )}\right )} + 8 \cdot 8^{\frac {1}{4}} {\left (\sqrt {2} {\left (2 \, x - 1\right )} + x + 3\right )}\right )} \sqrt {2 \, \sqrt {2} + 4} + \frac {4}{7} \, x + \frac {5}{7}\right ) + \frac {1}{2} \cdot 8^{\frac {1}{4}} \sqrt {2} \sqrt {2 \, \sqrt {2} + 4} \arctan \left (-\frac {1}{7} \, \sqrt {2} {\left (\sqrt {2} {\left (5 \, x + 1\right )} + 6 \, x + 4\right )} - \frac {1}{112} \, \sqrt {8 \, x^{2} - 8 \, \sqrt {x^{2} + x} x + 2 \, {\left (8^{\frac {1}{4}} \sqrt {x^{2} + x} {\left (\sqrt {2} - 1\right )} - 8^{\frac {1}{4}} {\left (\sqrt {2} x - x - 1\right )}\right )} \sqrt {2 \, \sqrt {2} + 4} + 4 \, x + 4 \, \sqrt {2} + 4} {\left (8 \, \sqrt {2} {\left (5 \, \sqrt {2} + 6\right )} - {\left (8^{\frac {3}{4}} {\left (5 \, \sqrt {2} + 6\right )} + 8 \cdot 8^{\frac {1}{4}} {\left (2 \, \sqrt {2} + 1\right )}\right )} \sqrt {2 \, \sqrt {2} + 4} + 64 \, \sqrt {2} + 32\right )} + \frac {1}{7} \, \sqrt {x^{2} + x} {\left (\sqrt {2} {\left (5 \, \sqrt {2} + 6\right )} + 8 \, \sqrt {2} + 4\right )} - \frac {1}{7} \, \sqrt {2} {\left (8 \, x + 3\right )} + \frac {1}{56} \, {\left (8^{\frac {3}{4}} {\left (\sqrt {2} {\left (5 \, x + 1\right )} + 6 \, x + 4\right )} - \sqrt {x^{2} + x} {\left (8^{\frac {3}{4}} {\left (5 \, \sqrt {2} + 6\right )} + 8 \cdot 8^{\frac {1}{4}} {\left (2 \, \sqrt {2} + 1\right )}\right )} + 8 \cdot 8^{\frac {1}{4}} {\left (\sqrt {2} {\left (2 \, x - 1\right )} + x + 3\right )}\right )} \sqrt {2 \, \sqrt {2} + 4} - \frac {4}{7} \, x - \frac {5}{7}\right ) + \frac {1}{4} \, \sqrt {x^{2} + x} {\left (2 \, x + 5\right )} + \frac {5}{8} \, \log \left (-2 \, x + 2 \, \sqrt {x^{2} + x} - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (x \left (x + 1\right )\right )^{\frac {3}{2}}}{x^{2} + 1}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (x^2+x\right )}^{3/2}}{x^2+1} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________